<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/WEB-INF/jsp/commons/taglibs.jsp" %>
<!DOCTYPE HTML>
<html ng-app>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <META HTTP-EQUIV="pragma" CONTENT="no-cache">
    <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
    <META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
    <title>${title}</title>
    <%@ include file="/WEB-INF/jsp/commons/meta.jsp" %>
    <link href="${ctx}/resources/new/style.css" type="text/css" rel="stylesheet"/>

</head>
<body>
<!-- 分页显示演示开始 -->
<form id="listForm" class="well form-search" action="${ctx}/point/record/list" method="post">
    <input type="hidden" name="pageNo" id="pageNo" value="${pageData.pagination.pageNo}"/>
    <input type="hidden" name="fieldName" id="fieldName" value="${pageData.compositor.fieldName}"/>
    <input type="hidden" name="compositorType" id="compositorType" value="${pageData.compositor.compositorType}"/>
    <table class="table table-striped table-bordered table-condensed">
        <tr align="center">
            <th>
                用户名|手机号|积分部门：
                <y:search fieldType="S" fieldList="member.userName,member.mobile,idepart.name" matchType="LIKE"
                          className="input-medium search-query searchBox"/>
                <%--<y:search fieldType="S" fieldList="idepart.name" matchType="LIKE" className="input-medium searchBox" />--%>
                <button class="btn btn-small" onclick="search()" type="button">
                    <i class="icon-search"></i>
                    搜索
                </button>
            </th>
        </tr>
    </table>
</form>
<table id="tableList" class="table table-striped table-bordered table-condensed">
    <thead>
    <tr>
        <th>#</th>
        <th>
            <a href="javascript:sort('insertTime')">积分/兑换时间</a>
        </th>
        <th>
            <a href="javascript:sort('member')">积分会员</a>
        </th>
        <th>
            <a href="javascript:sort('member')">手机号</a>
        </th>
        <th>
            <a href="javascript:sort('iCode')">积分码</a>
        </th>
        <th>
            <a href="javascript:sort('name')">商品名称</a>
        </th>
        <th>
            <a href="javascript:sort('idepart')">积分部门</a>
        </th>
        <th>
            <a href="javascript:sort('point')">当前积分</a>
        </th>
        <th>
            <a href="javascript:sort('balance')">当前余额</a>
        </th>
        <th>
            <a href="javascript:sort('type')">类型</a>
        </th>
        <th>
            <a href="javascript:sort('oper')">操作员</a>
        </th>
    </tr>
    </thead>
    <tbody>
    <c:forEach var="entity" items="${pageData.result}" varStatus="index">
        <tr <c:if test="${!entity.visible}">bgcolor="#AFEEEE"</c:if>>
            <td>${index.index + 1}</td>
            <td>${entity.insertTime}</td>
            <td>${entity.member.userName }</td>
            <td>${entity.member.mobile }</td>
            <td>${entity.iCode }</td>
            <td>${entity.name }</td>
            <td>${entity.idepart.name }</td>
            <td><fmt:formatNumber pattern="###,###">${entity.point}</fmt:formatNumber></td>
            <td><fmt:formatNumber pattern="###,###">${entity.balance}</fmt:formatNumber></td>
            <td>${entity.type.value}</td>
            <td>${entity.oper}</td>
        </tr>
    </c:forEach>
    <c:if test="${fn:length(pageData.result) == 0}">
        <tr>
            <td colspan="20">
                无记录...
            </td>
        </tr>
    </c:if>
    </tbody>
</table>
<%@ include file="/WEB-INF/jsp/commons/pager.jsp" %>
<script>
    $(function () {
        $(".searchBox").keyup(function () {
            $(".searchBox").val($(this).val());
        });
    });
</script>
</body>
</html>